package kse;

import java.util.Scanner;

public class J032Tax {
	//세금 계산프로그램
	//조건:미혼-연봉이 3천미만:5%
	//		 연봉이3천이상:10%
	//	 기혼-연봉5천미만:15%
	//		연봉 5천이상:30%
	// 입력값:결혼여부,연봉
	//결과값:비율에 따른 세금
	public static void main(String[] args) {
		//1변수선언
		int married; //결혼여부, 0이면미혼 1이면 기혼
		int salary; //연봉
		double tax = 0;// 0 초기화 필수
		String title1 ="결호여부를 입력하세요(0이면미혼1이면기혼)";
		String title2 ="연봉을 입력하세요";
		Scanner sc=null;
		
		
		//2결혼여부,연봉입력및 세금계산
		sc=new Scanner(System.in);
		System.out.println(title1);
		married = sc.nextInt();
		System.out.println(title2);
		salary = sc.nextInt();
				
		if(married ==0){if(salary<3000){tax =salary*0.05;}
		if(salary>=3000){tax = salary*0.1;}}
		
		if(married ==1){if(salary<5000){tax=salary*0.15;}
		if(salary>=5000){tax=salary*0.3;}}
		
		sc.close();
		
		
		//결과출력
		System.out.println(married);
		System.out.println(salary);
		System.out.println(tax);
		
		
		
	}

}
